import 'package:flutter_test/flutter_test.dart';
import 'package:lib_common/lib_common.dart';

void main() {
  group("测试数值运算", () {
    test("测试加法运算", () {
      double a = 0.1;
      double b = 0.2;
      // expect(a + b, 0.3);
      expect(CalculateUtils.addition(a, b), 0.3);
    });
    test("测试减法运算", () {
      double a = 0.3;
      double b = 0.2;
      // expect(a - b, 0.1);
      expect(CalculateUtils.subtraction(a, b), 0.1);
    });
    test("测试乘法运算", () {
      double a = 0.1;
      double b = 0.2;
      // expect(a * b, 0.02);
      expect(CalculateUtils.multiplication(a, b), 0.02);
    });
    test("测试除法运算", () {
      double a = 0.3;
      double b = 0.2;
      // expect(a / b, 1.5);
      expect(CalculateUtils.division(a, b), 1.5);
    });
  });
}
